{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "217918cf",
   "metadata": {},
   "outputs": [],
   "source": [
    "#coding=gbk\n",
    " \n",
    "import pandas as pd \n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "import os\n",
    "import time "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "02e4c5d2",
   "metadata": {},
   "outputs": [],
   "source": [
    "sta = time.time()\n",
    "path = r'D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e8b48fb2",
   "metadata": {},
   "outputs": [],
   "source": [
    "class Plot_image():\n",
    "    def __init__(self, path):\n",
    "        self.path = path\n",
    "        # self.start = time.time()\n",
    "    \n",
    "    def __str__(self):\n",
    "        end = time.time()\n",
    "        return 'spending time : %.3f'%(end-self.start) + ' s'\n",
    "    \n",
    "    def get_all_file(self): #获取文件夹中的所有CSV，excel类型文件名称\n",
    "        files =os.listdir(path)\n",
    "        # files.sort(key=lambda x:int(x[:-4])) \n",
    "        s= []\n",
    "        for file in files:\n",
    "            if not  os.path.isdir(path +file):  #判断该文件是否是一个文件夹       \n",
    "                f_name = str(file)  #        \n",
    "                # print(f_name)\n",
    "                tr = '\\\\'\n",
    "                filename = path + tr + f_name        \n",
    "                s.append(filename)  # 把当前文件名返加到列表里\n",
    "        return s\n",
    "        \n",
    "    def get_data(self, i):  #获得相应表格文件的数据（我们只需要读第一列，x方向的力）\n",
    "        list = self.get_all_file()  # 所有的表格文件\n",
    "        data = pd.read_csv(list[i-1],header=None)\n",
    "        return data\n",
    "    \n",
    "    def get_shape(self, n=2):   # n（最大315）为获取多少个 表格 文件的 shape\n",
    "        k = 0\n",
    "        print('-------start output shape------')\n",
    "        for i in range(1, n+1):\n",
    "            list= self.get_all_file()\n",
    "            data = pd.read_csv(list[i-1],header=None)\n",
    "            print(str(i) +' shape is: ' + str(data.shape), end=' ; ')\n",
    "            k += 1\n",
    "            if k%3==0:\n",
    "                print()\n",
    "        print()\n",
    "        print('-------output done------')\n",
    "        \n",
    "    def get_max_min_shape(self, n=2):\n",
    "#         k = np.empty((315, 1))\n",
    "        print('-------start output shape------')\n",
    "#         for i in range(n):\n",
    "#             list= self.get_all_file()\n",
    "#             data = pd.read_csv(list[i],header=None)\n",
    "#             shape = data.shape\n",
    "#             k[i] = shape[0]\n",
    "        list= self.get_all_file()\n",
    "        k = [pd.read_csv(list[i], header=None).shape[0] for i in range(n)]\n",
    "        k = np.array(k)\n",
    "        max = np.max(k)\n",
    "        min = np.min(k)\n",
    "        mean = np.mean(k)\n",
    "        print('max : %d, min: %d, mean: %d'%(max, min, mean)) \n",
    "        print('-------output done------')\n",
    "    \n",
    "    def get_shape_num(self, n=2): # 计算若干execl中有多少行\n",
    "        k = 0\n",
    "        print('-------start output shape number------')\n",
    "        for i in range(1, n+1):\n",
    "            list= self.get_all_file()\n",
    "            data = pd.read_csv(list[i-1],header=None)\n",
    "            shape = data.shape \n",
    "            k += shape[0]\n",
    "        print('all shape rows sum is : %d'%(k))\n",
    "        print('-------output shape number done------')\n",
    "        \n",
    "    def get_file_feature(self, i=1, column_num = 0): # 获取单一表格中的10个特征\n",
    "        # i: 表格编号， column_num: 表格中的第几列数据\n",
    "        li = []\n",
    "        data = self.get_data(i=i)\n",
    "        data = data.iloc[:, column_num] #1.使用全部数据集，2.使用10万个数据量\n",
    "        size = data.size\n",
    "        #最大值\n",
    "        max = np.max(data)\n",
    "        li.append(max)\n",
    "        #均方根值\n",
    "        root_mean_score = np.sqrt(np.sum(np.square(data)) / size)\n",
    "        li.append(root_mean_score)\n",
    "        #歪度值\n",
    "        skewness = np.sum(np.power(data, 3)) / size\n",
    "        li.append(skewness)\n",
    "        #峭度值\n",
    "        Kurtosis_value = np.sum(np.power(data, 4)) / size\n",
    "        li.append(Kurtosis_value)\n",
    "        #波形指标\n",
    "        absolute_mean_value = np.sum(np.fabs(data)) / size #绝对平均值\n",
    "        shape_factor = root_mean_score / absolute_mean_value\n",
    "        li.append(shape_factor)\n",
    "        #脉冲指标\n",
    "        pulse_factor = max / absolute_mean_value\n",
    "        li.append(pulse_factor)\n",
    "        #歪度指标\n",
    "        Kurtosis_factor = Kurtosis_value / root_mean_score\n",
    "        li.append(Kurtosis_factor)\n",
    "        #峰值指标\n",
    "        crest_factor = max / root_mean_score\n",
    "        li.append(crest_factor)\n",
    "        #裕度指标\n",
    "        Root_amplitude = np.square(np.sum(np.sqrt(np.fabs(data))) / size)   #方根幅值\n",
    "        clearance_factor = max / Root_amplitude\n",
    "        li.append(clearance_factor)\n",
    "        #峭度指标\n",
    "        Kurtosis_factor = Kurtosis_value / np.power(root_mean_score, 4)\n",
    "        li.append(Kurtosis_factor)\n",
    "        return li\n",
    "    \n",
    "    def get_all_featrue(self, n=315):\n",
    "        print('-------start output all feature------')\n",
    "        all_feature = [self.get_file_feature(i=i, column_num=0) for i in range(1, n+1)]\n",
    "        all_feature = np.array(all_feature).reshape(-1, 10)\n",
    "        all_feature = pd.DataFrame(all_feature)\n",
    "        \n",
    "        filename = r'D:\\ml_datasets\\PHM\\c6_new_train\\X_feature_denoise.csv'\n",
    "        all_feature.to_csv(filename, index=False)\n",
    "        print('-------output all feature done------')\n",
    "            \n",
    "            \n",
    "    def plot(self,column_nu=3, show=True, x_name='X axies', y_name='y axies', i=1): #n 表示对那个 csv 文件进行可视化\n",
    "        data = self.get_data(i)\n",
    "        print('data shape is :' + str(data.shape))\n",
    "        plt.plot(data.iloc[0:1000, column_nu])\n",
    "#     plt.title(column_name)\n",
    "        plt.xlabel(x_name, fontproperties='FangSong')\n",
    "        plt.ylabel(y_name, fontproperties='FangSong')\n",
    "        if show:\n",
    "            plt.show()\n",
    "    \n",
    "    def plot_wear_amount(self, filename=None):\n",
    "        data = pd.read_csv(filename)\n",
    "        plt.figure(num='plot_wear_amount', figsize=((6,3)))\n",
    "        \n",
    "        ax = plt.gca()      #设置原点\n",
    "        ax.spines['right'].set_color('none') \n",
    "        ax.spines['top'].set_color('none')\n",
    "        ax.xaxis.set_ticks_position('bottom')   #将底部和左边的框设置为X， y轴\n",
    "        ax.yaxis.set_ticks_position('left')\n",
    "        ax.spines['bottom'].set_position(('data', 0)) #将x， y的0点，设值为原点\n",
    "        ax.spines['left'].set_position(('data', 0))\n",
    "        \n",
    "        X = np.arange(0, 315)\n",
    "        y1 = data['flute_1']\n",
    "        y2 = data['flute_2']\n",
    "        y3 = data['flute_3']\n",
    "        y4 = (y1+y2+y3) / 3\n",
    "#         plt.plot(X, y1)\n",
    "#         plt.plot(X, y2)\n",
    "#         plt.plot(X, y3)\n",
    "        plt.plot(X, y4, color='black')\n",
    "        plt.plot([20, 20], [0, y4[20]], color='red', linestyle='--')\n",
    "        plt.plot([180, 180], [0, y4[180]], color='blue', linestyle='--')\n",
    "        plt.xticks([0, 20, 50, 100, 150, 180, 250, 300])\n",
    "        plt.yticks([50, 100, 150, 200])\n",
    "        plt.xlabel('走刀次数 n', fontproperties='FangSong')\n",
    "        plt.ylabel(r'平均磨损量$\\mu m$', fontproperties='FangSong')\n",
    "        plt.text(5, 20, 'A', fontdict={'size':10, 'color':'red'})\n",
    "        plt.text(100, 20, 'B', fontdict={'size':10, 'color':'blue'})\n",
    "        plt.text(250, 20, 'C', fontdict={'size':10, 'color':'black'})\n",
    "        plt.text(22, 65, '(20, 78.1)', fontdict={'size':10, 'color':'black'})\n",
    "        plt.text(182, 110, '(180, 123.3)', fontdict={'size':10, 'color':'black'})\n",
    "        plt.text(20, 85, 'a', fontdict={'size':10, 'color':'black'})\n",
    "        plt.text(180, 128, 'b', fontdict={'size':10, 'color':'black'})\n",
    "        print(str(y4[20])+ \" ; \" + str(y4[180]))\n",
    "        \n",
    "#         plt.legend(['average'], loc=4)\n",
    "        plt.show()\n",
    "        \n",
    "    def test_current_actual_commad(self, k=1):   # 未使用\n",
    "#     plt.figure(num=num, figsize=((12,6)))\n",
    "        plt.subplot(2,4,1)\n",
    "        self.plot('X1_CurrentFeedback',False,  '', 'X1_current (A)',i=k)\n",
    "        plt.subplot(2,4,5)\n",
    "        self.plot('X1_OutputCurrent',False,  'time (ms)', 'X1_output (A)',i=k)\n",
    "        plt.subplot(2,4,2)\n",
    "        self.plot('Y1_CurrentFeedback',False,  '', 'Y1_current (A)',i=k)\n",
    "        plt.subplot(2,4,6)\n",
    "        self.plot('Y1_OutputCurrent',False,  'time (ms)', 'Y1_output (A)',i=k)\n",
    "        plt.subplot(2,4,3)\n",
    "        self.plot('Z1_CurrentFeedback',False,  'time (ms)', 'Z1_cur (A)',i=k)\n",
    "        plt.subplot(2,4,7)\n",
    "        self.plot('Z1_OutputCurrent',False,  'time (ms)', 'Z1_output (A)',i=k)\n",
    "        plt.subplot(2,4,4)\n",
    "        self.plot('S1_CurrentFeedback',False,  'time (ms)', 'S1_cur (A)',i=k)\n",
    "        plt.subplot(2,4,8)\n",
    "        self.plot('S1_OutputCurrent',False,  'time (ms)', 'S1_output (A)',i=k)\n",
    "    \n",
    "    def test_normal_picture(self, li=[5, 170, 300], column=4):   # 画出初期、正常、急剧磨损的X轴、Y轴振动信号\n",
    "        plt.rcParams['font.sans-serif'] = ['SimHei']    #显示黑体，或者： plt.xlabel('显示中文', fontproperties='SimHei')\n",
    "        plt.rcParams['axes.unicode_minus'] = False\n",
    "        fig, axes = plt.subplots(3, 1, figsize=(15, 8))\n",
    "        X1 = self.get_data(li[0]).iloc[:, column]\n",
    "        X2 = self.get_data(li[1]).iloc[:, column]\n",
    "        X3 = self.get_data(li[2]).iloc[:, column]\n",
    "        \n",
    "        print('axes_1: max is %.2f, min is %.2f'%(np.max(X1), np.min(X1)))  # max is 0.34, min is -0.42\n",
    "        print('axes_2: max is %.2f, min is %.2f'%(np.max(X2), np.min(X2)))  # max is 0.86, min is -1.22\n",
    "        print('axes_3: max is %.2f, min is %.2f'%(np.max(X3), np.min(X3)))  # max is 2.02, min is -1.63\n",
    "        \n",
    "        axes[0].plot(X1, label='Y方向振动信号')\n",
    "        axes[0].set_ylim([-0.5, 0.5])\n",
    "        y_min = np.full(shape=(230000, 1), fill_value=np.min(X1))\n",
    "        y_max = np.full(shape=(230000, 1), fill_value=np.max(X1))\n",
    "        axes[0].plot( y_min, label='最小值= %.2f'%(np.min(X1)), linestyle='--')\n",
    "        axes[0].plot(y_max, label='最大值= %.2f'%(np.max(X1)), linestyle='-.')\n",
    "        axes[0].spines['right'].set_color('none') \n",
    "        axes[0].spines['top'].set_color('none')\n",
    "        axes[0].set_yticks([-0.50, -0.25, 0, 0.25, 0.50])\n",
    "        axes[0].legend(loc=4)\n",
    "        \n",
    "        axes[1].plot(X2, label='Y方向振动信号')\n",
    "        axes[1].set_ylim([-1.8, 1.8])\n",
    "        y_min = np.full(shape=(230000, 1), fill_value=np.min(X2))\n",
    "        y_max = np.full(shape=(230000, 1), fill_value=np.max(X2))\n",
    "        axes[1].plot( y_min, label='最小值= %.2f'%(np.min(X2)), linestyle='--')\n",
    "        axes[1].plot(y_max, label='最大值= %.2f'%(np.max(X2)), linestyle='-.')\n",
    "        axes[1].spines['right'].set_color('none') \n",
    "        axes[1].spines['top'].set_color('none')\n",
    "        axes[1].set_yticks([-1.80, -0.90, 0, 0.90, 1.80])\n",
    "        axes[1].legend(loc=4)\n",
    "        \n",
    "        axes[2].plot(X3, label='Y方向振动信号')\n",
    "        axes[2].set_ylim([-3.0, 3.0])\n",
    "        y_min = np.full(shape=(230000, 1), fill_value=np.min(X3))\n",
    "        y_max = np.full(shape=(230000, 1), fill_value=np.max(X3))\n",
    "        axes[2].plot( y_min, label='最小值= %.2f'%(np.min(X3)), linestyle='--')\n",
    "        axes[2].plot(y_max, label='最大值= %.2f'%(np.max(X3)), linestyle='-.')\n",
    "        axes[2].spines['right'].set_color('none') \n",
    "        axes[2].spines['top'].set_color('none')\n",
    "        axes[2].set_yticks([-3.00, -1.50, 0, 1.50, 3.00])\n",
    "        axes[2].legend(loc=4)\n",
    "        \n",
    "        axes[2].set_xlabel('采样点数', fontproperties='SimHei', fontsize=20)\n",
    "        axes[1].set_ylabel(r'Y 方向加速度/$mm* s^2$', fontproperties='SimHei', fontsize=20)\n",
    "        \n",
    "        plt.show()\n",
    "    \n",
    "    def save_fig(self, n=2, current=False, acceleration=False):\n",
    "        if current:\n",
    "            for k in range(1, n+1):\n",
    "                data = self.get_data(i = k)    #获取对应的文件\n",
    "                name = 'E:\\\\hello_world'\n",
    "                name = name + str(k) + '.png'\n",
    "                print(name)\n",
    "                \n",
    "                plt.figure(num=name, figsize=((12,6)))\n",
    "                self.test_current_actual_commad(k=k)\n",
    "                plt.savefig(name)\n",
    "        if acceleration:\n",
    "            for k in range(1, n+1):\n",
    "                data = self.get_data(i = k)    #获取对应的文件\n",
    "                name = 'E:\\\\E:\\\\hello_world'\n",
    "                name = name + str(k) + '.png'\n",
    "                print(name)\n",
    "                \n",
    "                plt.figure(num=name, figsize=((12,6)))\n",
    "                self.test_acceleration_actual_commad(k=k)\n",
    "                plt.savefig(name)\n",
    "    #将时域、时频域获取的特征， 与输出特征进行结合\n",
    "    def merge_csv(self, filename = r'D:\\\\ml_datasets\\PHM\\c6_new_train\\xy_final_data.csv'):\n",
    "        data = pd.read_csv(filename,header=None)\n",
    "        data_wear = np.empty((315, 1))\n",
    "        data_wear[:21] = 0\n",
    "        data_wear[21:181] = 1\n",
    "        data_wear[181:] = 2\n",
    "        data_wear = pd.DataFrame(data_wear, columns=['out'])\n",
    "        real_data = pd.concat((data, data_wear), axis=1)\n",
    "        new_filename = r'D:\\\\ml_datasets\\PHM\\c6_new_train\\xy_train_data.csv'\n",
    "        real_data.to_csv(new_filename, index=False)\n",
    "        print('---merge done---') \n",
    "    \n",
    "    def merge_xy(self):\n",
    "        x_filename = r'D:\\ml_datasets\\PHM\\c6_new_train\\X_feature_denoise.csv'\n",
    "        y_filename = r'D:\\ml_datasets\\PHM\\c6_new_train\\Y_feature_denoise.csv'\n",
    "        x_data = pd.read_csv(x_filename,header=None)\n",
    "        y_data = pd.read_csv(y_filename,header=None)\n",
    "        data = pd.concat((x_data, y_data), axis=1)\n",
    "        filename = r'D:\\\\ml_datasets\\PHM\\c6_new_train\\xy_denoise_merge_data.csv'\n",
    "        data.to_csv(filename)\n",
    "        \n",
    " "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "4425688e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_001.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_002.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_003.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_004.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_005.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_006.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_007.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_008.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_009.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_010.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_011.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_012.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_013.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_014.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_015.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_016.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_017.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_018.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_019.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_020.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_021.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_022.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_023.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_024.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_025.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_026.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_027.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_028.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_029.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_030.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_031.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_032.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_033.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_034.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_035.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_036.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_037.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_038.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_039.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_040.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_041.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_042.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_043.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_044.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_045.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_046.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_047.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_048.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_049.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_050.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_051.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_052.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_053.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_054.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_055.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_056.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_057.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_058.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_059.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_060.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_061.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_062.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_063.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_064.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_065.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_066.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_067.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_068.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_069.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_070.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_071.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_072.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_073.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_074.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_075.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_076.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_077.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_078.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_079.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_080.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_081.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_082.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_083.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_084.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_085.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_086.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_087.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_088.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_089.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_090.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_091.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_092.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_093.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_094.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_095.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_096.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_097.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_098.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_099.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_100.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_101.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_102.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_103.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_104.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_105.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_106.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_107.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_108.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_109.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_110.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_111.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_112.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_113.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_114.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_115.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_116.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_117.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_118.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_119.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_120.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_121.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_122.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_123.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_124.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_125.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_126.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_127.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_128.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_129.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_130.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_131.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_132.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_133.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_134.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_135.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_136.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_137.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_138.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_139.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_140.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_141.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_142.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_143.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_144.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_145.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_146.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_147.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_148.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_149.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_150.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_151.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_152.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_153.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_154.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_155.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_156.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_157.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_158.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_159.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_160.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_161.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_162.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_163.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_164.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_165.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_166.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_167.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_168.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_169.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_170.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_171.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_172.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_173.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_174.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_175.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_176.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_177.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_178.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_179.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_180.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_181.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_182.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_183.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_184.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_185.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_186.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_187.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_188.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_189.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_190.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_191.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_192.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_193.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_194.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_195.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_196.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_197.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_198.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_199.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_200.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_201.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_202.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_203.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_204.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_205.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_206.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_207.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_208.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_209.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_210.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_211.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_212.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_213.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_214.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_215.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_216.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_217.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_218.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_219.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_220.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_221.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_222.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_223.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_224.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_225.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_226.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_227.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_228.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_229.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_230.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_231.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_232.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_233.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_234.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_235.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_236.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_237.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_238.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_239.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_240.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_241.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_242.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_243.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_244.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_245.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_246.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_247.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_248.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_249.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_250.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_251.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_252.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_253.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_254.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_255.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_256.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_257.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_258.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_259.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_260.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_261.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_262.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_263.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_264.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_265.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_266.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_267.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_268.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_269.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_270.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_271.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_272.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_273.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_274.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_275.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_276.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_277.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_278.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_279.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_280.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_281.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_282.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_283.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_284.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_285.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_286.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_287.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_288.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_289.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_290.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_291.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_292.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_293.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_294.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_295.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_296.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_297.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_298.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_299.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_300.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_301.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_302.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_303.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_304.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_305.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_306.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_307.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_308.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_309.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_310.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_311.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_312.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_313.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_314.csv\n",
      "D:\\desktop\\铣削力数据集\\PHM2010data\\c1_new\\c_1_315.csv\n"
     ]
    }
   ],
   "source": [
    "# 打印全部文件名称(pass)\n",
    "show = Plot_image(path) \n",
    "s = show.get_all_file()\n",
    "for item in s:\n",
    "    print(item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "ab5af0ba",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(127399, 7)\n",
      "0.704\n"
     ]
    }
   ],
   "source": [
    "# 获取文件数据(pass)\n",
    "data = show.get_data(i=1)\n",
    "print(data.shape)\n",
    "data = np.array(data)\n",
    "print(data[0,0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ee3081b8",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 打印表格shape(pass)\n",
    "shape = show.get_shape(n = 315)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "id": "c3436136",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-------start output shape------\n",
      "max : 217295, min: 127399, mean: 172347\n",
      "-------output done------\n"
     ]
    }
   ],
   "source": [
    "ss = show.get_max_min_shape(n=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "8c615b04",
   "metadata": {},
   "outputs": [],
   "source": [
    "# 计算若干execl中有多少行(pass)\n",
    "ss = show.get_shape_num(n = 2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "48c9a85a",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[np.float64(3.744), np.float64(0.9329728569808686), np.float64(0.9868258069021816), np.float64(2.2082888604200495), np.float64(1.2516180738963796), np.float64(5.022716399094702), np.float64(2.3669379488339524), np.float64(4.012978482692101), np.float64(5.935769389869205), np.float64(2.91460594061158)]\n"
     ]
    }
   ],
   "source": [
    "li = show.get_file_feature()\n",
    "print(li)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "cc295d2f",
   "metadata": {},
   "outputs": [],
   "source": [
    "#新的数据集中的全部数据集\n",
    "\n",
    "\n",
    "# show.test_normal_picture()\n",
    " \n",
    "# show.merge_csv()\n",
    "# show.plot(column_nu=3, show=True, x_name='x_name', y_name='y_name', i=1)\n",
    " \n",
    "# show.get_shape(315)\n",
    "# show.get_max_min_shape(315)\n",
    "# max : 225119, min: 192314, mean: 219488\n",
    "# max : 225119, min: 192314, mean: 219488 #使用np.empty()\n",
    "# -------output done------\n",
    "# spending time : 106.582\n",
    " \n",
    "# max : 225119, min: 192314, mean: 219488 使用[] 可以减少时间\n",
    "# -------output done------\n",
    "# spending time : 95.607\n",
    " \n",
    "# show.get_shape_num(315)    #计算总的shape数\n",
    "# -------start output shape------\n",
    "# all shape rows sum is : 69138724\n",
    "# spending time : 108.445\n",
    "# 花费的时间: 108.446\n",
    " \n",
    "# file1 = r'D:\\ml_datasets\\PHM\\c1_wear.csv'\n",
    "# file6 = r'D:\\ml_datasets\\PHM\\c6_wear.csv'\n",
    " \n",
    "# show.plot_wear_amount(file)    #画磨损量的图\n",
    "# show.plot_wear_amount(file6)\n",
    " \n",
    "# show.get_all_featrue()\n",
    " \n",
    "# show.get_all_featrue() # 增加y轴振动信号的10 个特征向量\n",
    "# show.merge_xy()\n",
    "# show.merge_csv()\n",
    " \n",
    "# show.test_normal_picture()\n",
    " \n",
    "#降低样本数量，进行特征提取,选用10 万个数据量\n",
    "# show.get_all_featrue()\n",
    "# show.merge_xy()\n",
    "# show.merge_csv()\n",
    " \n",
    " \n",
    "# print(show)\n",
    " \n",
    "# data = np.empty((3, 1), dtype='int32')\n",
    "# print(data)\n",
    "# for i in range(0,3):\n",
    "#     data[i] = i+1 \n",
    "# print(data)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
